﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YXChatFormClient.Dtos.Account;

namespace YXChatFormClient.Global
{
    /// <summary>
    /// 全局的用户信息
    /// </summary>
    public static class GlobalAccountInfo
    {
        public static AccountDto Account;

        public static string AccountAvatar
        {
            set
            {
                if (Account != null)
                {
                    if (AvatarChanged != null) AvatarChanged();
                    Account.Avatar = value;
                }
            }
        }

        public delegate void AvatarChangedHandler();

        public static event AvatarChangedHandler AvatarChanged;
    }
}
